package com.note.gateway.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 用户服务Feign客户端
 * 用于网关调用用户服务接口
 */
@FeignClient(name = "note-app", path = "/user")
public interface UserFeignClient {

    /**
     * 验证Token是否有效
     *
     * @param userId 用户ID
     * @param token Token内容
     * @return 是否有效
     */
    @GetMapping("/token/validate")
    boolean validateToken(@RequestParam("userId") Long userId, @RequestParam("token") String token);
} 